<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>

<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script type="text/javascript" src="${staticServer}/common/uploadify/jquery.uploadify.js"></script>
<script type="text/javascript" src="${staticServer}/js/web/uploadImg.js?1.5"></script>
<script>
var contextPath='${contextPath}';
var _contextPath = '${staticServer}';

$(function(){
	$("#type").val("<#if lius?? && lius.is_has=="1">${lius.type}</#if>");
});

var addLiuShui = function(){
	var id = $("#id").val();
	var type = $("#type").val();
	var date = $("#date").val();
	var moneys = $("#moneys").val();
	var zhaiyao = $("#zhaiyao").val();
	var beizhu = $("#beizhu").val();
	var fj_url = $("#all_words").val();
	if(type==""){
		infopad.err("请选择科目名称!");
		return;
	}
	if(date==""){
		infopad.err("请选择日期!");
		return;
	}
	if(moneys==""){
		infopad.err("请填写金额!");
		return;
	}
	
	$.post("${contextPath}/index/addLiushui_go.json", {
			"id" : id,
			"type" : type,
			"date" : date,
			"moneys":moneys,
			"zhaiyao":zhaiyao,
			"beizhu":beizhu,
			"fj_url":fj_url
		}, function(ms) {
		    var msg = ms.msg;
		    if(msg=="1"){
				infopad.msg("操作成功！");
				window.location.href="${contextPath}/index/tealiushuiList.htm";
		    }else{
		    	infopad.err("系统忙，请联系管理员！");
		    }
			
	});
};

</script>

</head>

<body>
<input type="hidden" id="id" value="<#if lius?? && lius.is_has=="1">${lius.id}</#if>">
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">title</li>
		</ul>
	</div>

	<div id="container">
		<div id="title">添加中心支付方式</div>
		<table id="infotable">
			<tr>
				<th>科目名称:</th>
				<td>
				<select id="type">
					<option value="">请选择</option>
					<option value="1">收入</option>
					<option value="2">支出</option>
				</select>
				</td>
			</tr>
			<tr>
				<th>日期:</th>
				<td style="height:20px;" id="methodMsg">
				<input type="text" id="date" value="<#if lius.is_has=="1">${lius.date}</#if>" rel="DATE::Y-m-d" size="15" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
			<tr>
				<th>金额:</th>
				<td><input id="moneys" type="text" value="<#if lius?? && lius.is_has=="1">${lius.moneys}</#if>" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9.]/g,'')" size="10" maxlength="10" /></td>
			</tr>
			<tr>
				<th>摘要:</th>
				<td><input id="zhaiyao" type="text" value="<#if lius?? && lius.is_has=="1">${lius.zhaiyao}</#if>" size="50" maxlength="100" /></td>
			</tr>
			<tr>
				<th>备注:</th>
				<td><input id="beizhu" type="text" value="<#if lius?? && lius.is_has=="1">${lius.beizhu}</#if>" size="50" maxlength="100" /></td>
			</tr>
			<tr style="height:100px;">
				<th>上传附件：</th>
				<td>
					 <div    style="  width:400px;  ">
                         <input    type="text" name="text" disabled id="all_words" /> 
                         <input   type="hidden" value="" id="oname" />
                     
                         <input style = " padding: 0 15px 0 15px;border: 1px solid #fff;
"  type="file" name="file" id="upload4" /> 
                       
                    </div>
                   
                </td>
		</table>
		<div id="controlbar">
			<input type="button" class="submit" onclick="addLiuShui()" value="  保存  " />
		</div>
	</div>
	
</body>
</html>